<template>
  <div id="app">
    <el-container>
      <el-header class='m-header'>
        <div class="logo">
          <router-link to="/">
            <img src="./assets/img/logo.png" alt />
          </router-link>
        </div>
        <el-menu
          :default-active="$route.path"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
          :router="router"
        >
          <el-menu-item index="/">首页</el-menu-item>
          <el-menu-item index="/case">精选案例</el-menu-item>
          <el-menu-item index="/news">新闻动态</el-menu-item>
          <!-- <el-menu-item index="/product">产品中心</el-menu-item> -->
          <!-- <el-menu-item index="/goin">走进胡巴</el-menu-item> -->
          <!-- <el-menu-item index="/contact">联系我们</el-menu-item> -->
        </el-menu>
      </el-header>
      <el-main>
        <!-- 在父组件的 router-view 中加一个 key $route.path不同 组件会强制不复用 重新调用生命周期函数-->
        <router-view :key="$route.path" />
      </el-main>
      <div class="footer" v-show="$route.path!='/'">
        <div class="footer-content">
          <ul class="content-nav">
            <li>
              <p>联系我们</p>
              <span>邮箱：hoopa@hoopa.com</span>
              <span>电话：400-800-1682</span> 
              <span>地址：杭州市滨江区滨盛路1786号汉氏大厦15F</span>
              <span>版权所有 © 2020 胡巴控股浙ICP备19047364号</span>
            </li>
          </ul>
          <img  class="erwei" src="./assets/img/二维码.jpg" alt />
        </div>
        <div class="copyright">
        </div>
      </div>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      router: true,
      defaultActive: "/",
      isShow: false
    };
  },
  methods: {
    handleSelect() {
      // this.isShow = this.defaultActive != key;
      window.console.log(this.isShow);
    }
  }
};
</script>

<style lang="scss">
* {
  padding: 0;
  margin: 0;
}
html,
body {
  height: 100%;
}

#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
.m-header{
  height: 60px !important;
  .el-menu-demo{
    background-color: white;
  }
}
.el-header {
  display: flex;
  justify-content: space-between;
  align-content: center;
  width: 90%;
  margin: 0 auto;
  // background-color: #fff;

  .logo {
    width: 100px;
    // padding: 10px;
    img {
      width: 100%;
      line-height: 60px;
    }
  }
}
.el-main {
  padding: 0 !important;
}

.footer {
  width: 100%;
  height: 170px;
  box-sizing: border-box;
  overflow: hidden;
  // background-color: #14679f;
  // background-image: linear-gradient(#2cb5e8 0%,#14679f 75% );
  background: url("./assets/img/footerbeij.jpg") no-repeat;
  background-size: 100%;
  .erwei{
    width: 150px;
    height: 150px;
  }
  &-content {
    width: 100%;
    height: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    .content-nav {
      display: flex;
      justify-content: space-around;
      padding-left: 20px;
      li {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        p {
          font-size: 20px;
          color: #d4edff;
          padding: 10px 0;
        }
        strong,
        span {
          color: #f7f7f7;
          font-weight: 300;
          padding: 5px 0;
        }
        strong{
          color: yellow !important;
        }
      }
    }
    img {
      width: 170px;
      height: 170px;
      padding: 10px;
    }
  }

}
</style>
